{% for item in chrony_allow_hosts %}
allow {{ item }}
{% endfor %}
commandkey 1
driftfile /var/lib/chrony/chrony.drift
dumpdir {{ chrony_dumpdir }}
dumponexit
keyfile /etc/chrony/chrony.keys
local stratum {{ chrony_local_stratum }}
log {{ chrony_log|join(' ') }}
logchange 0.5
logdir {{ chrony_logdir }}
maxupdateskew {{ chrony_maxupdateskew }}
rtconutc
{% for item in chrony_ntp_servers %}
{%   if item['options'] is not defined %}
server {{ item['server'] }}
{%   elif item['options'] is defined %}
server {{ item['server'] }}{% for opt in item['options'] %} {{ opt['option'] }}{% if opt['val'] is defined %} {{ opt['val'] }}{% endif %}{% endfor %}

{%   endif %}
{% endfor %}
